package com.neusoft.neumooc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.neusoft.core.common.BaseService;
import com.neusoft.core.common.exception.ServiceException;
import com.neusoft.neumooc.VO.OrderVO;
import com.neusoft.neumooc.dao.OrderDao;

@Service
@Transactional
public class OrderServiceImpl extends BaseService implements OrderService {
	@Autowired
	OrderDao orderDao;

	@Override
	public int addOrder(OrderVO orderVO) throws ServiceException {
		return orderDao.addOrder(orderVO);
	}

	@Override
	public int getOrderNum(String userId) throws ServiceException {
		return orderDao.getOrderNum(userId);
	}

	@Override
	public List<OrderVO> getOrderList(String userId, int pageIndex, int pageSize)
			throws ServiceException {
		return orderDao.getOrderList(userId, pageIndex, pageSize);
	}
}
